<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="fragments/head :: commonHead('错误页面')">
    <!-- 页面特定样式将由head.html中的通用头部替代 -->
</head>
<body class="bg-light">
    <div class="container py-5">
        <div class="row justify-content-center">
            <div class="col-md-8">
                <div class="card border-0 shadow-sm rounded-3 overflow-hidden">
                    <div class="card-header bg-danger text-white py-3">
                        <h5 class="mb-0">
                            <i class="fas fa-exclamation-triangle me-2"></i>发生错误
                        </h5>
                    </div>
                    <div class="card-body p-4">
                        <div class="text-center mb-4">
                            <i class="fas fa-times-circle text-danger" style="font-size: 5rem;"></i>
                            <h2 class="mt-3 mb-2">出现了一个问题</h2>
                            <p class="text-muted" th:if="${status}">错误代码: <span th:text="${status}">500</span></p>
                            <p class="text-muted" th:if="${error}">错误类型: <span th:text="${error}">Internal Server Error</span></p>
                            <p class="text-muted" th:if="${message}">错误信息: <span th:text="${message}">错误详情</span></p>
                            <p class="text-muted" th:if="${path}">请求路径: <span th:text="${path}">/path</span></p>
                            <p class="text-muted" th:unless="${message}">操作执行过程中发生了错误，请稍后重试或联系管理员。</p>
                        </div>
                        
                        <div class="d-flex justify-content-center">
                            <a href="/risk-management/" class="btn btn-primary me-2">
                                <i class="fas fa-home me-1"></i> 返回首页
                            </a>
                            <button onclick="history.back()" class="btn btn-outline-secondary">
                                <i class="fas fa-arrow-left me-1"></i> 返回上一页
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <footer class="footer mt-auto py-4 bg-dark text-white">
        <div class="container text-center">
            <span>© 2025 项目风险管理系统 | 版本 1.0</span>
        </div>
    </footer>
</body>
</html> 